Enable common USB Serial devices by default · Issue #7686 · microsoft/WSL · GitHub |
您所在的位置:网站首页 › usb devices enabled › Enable common USB Serial devices by default · Issue #7686 · microsoft/WSL · GitHub |
Hi, I've been trying to test the ESP32 in WSL with this setup: Windows 11 pro, build 22579.1 Windows Subsystem for Linux Preview 0.56.2 WSL kernel 5.10.102.1 (no modified) Ubuntu 20.04 over WSL2 usbipd 2.1.0 Powershell 7.2.2 No modified WSL kernelI attached the ESP32 with usbpid and I get the following by executing $ dmesg $ dmesg ... [ 1601.184053] vhci_hcd vhci_hcd.0: pdev(0) rhport(0) sockfd(3) [ 1601.185266] vhci_hcd vhci_hcd.0: devid(65542) speed(2) speed_str(full-speed) [ 1601.186392] vhci_hcd vhci_hcd.0: Device attached [ 1601.474405] vhci_hcd: vhci_device speed not set [ 1601.544561] usb 1-1: new full-speed USB device number 6 using vhci_hcd [ 1601.624393] vhci_hcd: vhci_device speed not set [ 1601.694383] usb 1-1: SetAddress Request (6) to port 0 [ 1601.730388] usb 1-1: New USB device found, idVendor=10c4, idProduct=ea60, bcdDevice= 1.00 [ 1601.731178] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 1601.731886] usb 1-1: Product: CP2102N USB to UART Bridge Controller [ 1601.732491] usb 1-1: Manufacturer: Silicon Labs [ 1601.732918] usb 1-1: SerialNumber: 044718903fe9eb11b63da08787c335f3 [ 1601.735773] cp210x 1-1:1.0: cp210x converter detected [ 1601.739526] usb 1-1: cp210x converter now attached to ttyUSB0That means that is it working? I have don't have too much knowledge about USBs on Linux and I can't be sure that is working because I tried to flash esp-idf's blink example with '$ idf.py flash' but it says: /dev/ttyUSB0 failed to connect: [Errno 13] could not open port /dev/ttyUSB0: [Errno 13] Permission denied: '/dev/ttyUSB0' After some research I found a workaround by running $ sudo chmod 0666 /dev/ttyUSB0, so I run again esp-idf flash and I get this output: $ idf.py flash Executing action: flash Serial port /dev/ttyUSB0 Connecting.... Detecting chip type... Unsupported detection protocol, switching and trying again... Connecting.... Detecting chip type... ESP32It stays like this like 20 seconds more less and then I get this output: Serial port /dev/ttyUSB0 Traceback (most recent call last): File "/home/diego/.espressif/python_env/idf4.4_py3.8_env/lib/python3.8/site-packages/serial/serialposix.py", line 322, in open self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK) FileNotFoundError: [Errno 2] No such file or directory: '/dev/ttyUSB0'And if I run usbipd wsl list on powershell, I find that the ESP32 (Silicon Labs CP210x USB to UART Bridge) has been detached. So, I don't really know if this issue has been resolved and I have a problem in another place or the issue continues and my problem when flashing is because of this issue. EDIT: I've been curious and I executed again $ dmesg after a flashing try and I got this: $ dmesg ... [ 1677.796756] vhci_hcd: unlink->seqnum 570 [ 1677.934506] vhci_hcd: urb->status 0 [ 1677.936030] vhci_hcd: unlink->seqnum 571 [ 1677.936450] vhci_hcd: urb->status 0 [ 1677.938238] vhci_hcd: cannot find a urb of seqnum 566 max seqnum 572 [ 1677.939955] vhci_hcd: stop threads [ 1677.970111] vhci_hcd: release socket [ 1677.970491] vhci_hcd: unlink cleanup rx 565 [ 1677.970940] vhci_hcd: the urb (seqnum 565) was already given back [ 1677.971581] vhci_hcd: unlink cleanup rx 567 [ 1677.971932] vhci_hcd: disconnect device [ 1677.982592] usb 1-1: USB disconnect, device number 6 [ 1682.994614] cp210x ttyUSB0: failed set request 0x12 status: -110 [ 1682.996149] cp210x ttyUSB0: failed set request 0x0 status: -19 [ 1682.997934] cp210x ttyUSB0: cp210x converter now disconnected from ttyUSB0 [ 1682.998765] cp210x 1-1:1.0: device disconnectedUPDATE: I flashed a new blink example (+ serial output) on Windows, attached the ESP32 to WSL and ran $ make monitor on the original blink example on WSL and I got the output from the ESP32! I tried $ make flash but it fails again with this output serial.serialutil.SerialTimeoutException: Write timeout and its deattached, $ idf.py monitor detach ESP32 from WSL too. |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |